package com.ls.task.job;

import org.apache.http.HttpEntity;
import org.apache.http.StatusLine;
import org.apache.http.util.EntityUtils;

import com.ls.fw.net.httpclient.utils.HttpclientUtil;
import com.ls.fw.net.httpclient.utils.HttpclientUtil.HttpEntityHandler;

public class LinkJob {

	public static final String METHODNAME = "exe";
	private String url = "";

	public LinkJob( ) {
		super();
	}
	public LinkJob(String url) {
		super();
		this.url = url;
	}

	public Object exe() throws Exception{
		return HttpclientUtil.get(url, new HttpEntityHandler<String>() {

			@Override
			public String handler(StatusLine arg0, HttpEntity arg1) throws Exception {
				// TODO Auto-generated method stub
				return EntityUtils.toString(arg1);
			}
		});
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
}
